package edu.ufop.vaadin.jdbc;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class ConnectionFactory {
	
	
	
	public Connection getConnection() throws Exception {
	try{
		Class.forName("org.postgresql.Driver");
		//Class.forName("com.postgresql.jdbc.Driver");
		//return DriverManager.getConnection("jdbc:postgresql://127.0.0.1:5432/elearning", "postgres", "psql");
		return DriverManager.getConnection("jdbc:postgresql://127.0.0.1:5432/ecomp", "postgres", "psql");

	} catch (SQLException e){
		throw new RuntimeException(e);
	}
	
}

}